The present application describes systems and techniques relating to generating new data values for an image region, for example, generating replacement data values to heal defective pixels using boundary conditions and/or using a sample of textured data values.
Traditional techniques for removing unwanted features from images include wire removal techniques such as used in movies, dust and scratches filters used in software applications such as PHOTOSHOP®, provided by Adobe Systems, Inc. of San Jose, Calif., inpainting and other algorithms. In typical replacement pixel data generation techniques, selected pixels in an image are regenerated based on values of the pixels bordering the selected pixels, and first and second order partial differential equations (e.g., the Laplace equation). For example, traditional inpainting techniques generally are based on second order the Laplace equation and/or anisotropic diffusion. These techniques typically result in noticeable discontinuities at the edges of the inpainted region.
Other techniques of generating replacement data values in an image region include applying area operations such as blurring or performing median calculations (e.g., using Gaussian filters and median filters) at each pixel in the selected region. The image area, or neighborhood, used for the area operation generally will include one or more selected pixels with undesirable data values. Thus, the neighborhood needs to be large enough to swamp the contributions of the undesirable pixel data. Oftentimes, a user must specify how large to make the neighborhood to minimize the effects of the undesirable data values. For example, techniques that are based on frequency domain separations generally require that the user specify a neighborhood size that will be used by the filter that separates gross details from fine details.
Some conventional techniques also apply a high-frequency component from another image to a healed region after it has been modified to replace defective pixel values. But the results of such traditional techniques for removing unwanted features of an image often do not reflect the true properties of most images. Areas of images that are filled-in using conventional techniques frequently have discontinuities at the boundary of the filled-in region and/or look blurred or otherwise appear to lack detail. These filled-in areas are often easily noticed and do not look like a natural part of the image, either because the surrounding areas are textured, or because pixel intensity changes sharply at the boundary of each filled-in area.